package com.story.service;

import com.story.spring.*;

//@Component("userService")
@Component()

//@Scope("singleton")
@Scope("prototype")
public class UserService implements UserInterface , BeanNameAware , InitializingBean {
    @Autowired
    private OrderService orderService;

    private String name;

    public void test(){
        System.out.println(orderService);
    }

    @Override
    public void setBeanName(String beanName) {
        this.name = beanName;
        System.out.println("BeanNameAware接口调用啦~");
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println(name + " afterPropertiesSet, Initializing接口~");
    }
}
